package com.theexceptions.todo.model;

/**
 * A Model to store and pass user information.
 * 
 * @author Justian Meyer
 */
public class User {

	private long userID;
	private String username;
	private String password;
	private String name;
	private String email;
	
	public static final User EMPTY_USER = new User(-1, "", "", "", "");

	public User(long userID, String username, String password, String name, String email) {
		this.userID = userID;
		this.username = username;
		this.password = password;
		this.name = name;
		this.email = email;
	}
	
	public boolean checkPassword(String password) {
		return this.password.equals(password);
	}

	public long getUserID() {
		return userID;
	}

	public String getUsername() {
		return username;
	}

	public String getPassword() {
		return password;
	}

	public String getName() {
		return name;
	}

	public String getEmail() {
		return email;
	}

	public void setUserID(long userID) {
		this.userID = userID;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public String toString() {
		return "User {" + userID + ", " + username + ", " + password + ", " + name + ", " + email + "}";
	}

}
